/**
 * Svn.java
 *
 * Copyright (c) 2010 Prj.Manager All Rights Reserved.
 *
 * This source file may not be copied, modified or redistributed,
 * in whole or in part, in any form or for any reason, without the express
 * written consent of Prj.Manager .
 **/

package ro.prjmanager.model;


import javax.persistence.*;

/**
 * This class from the domain model is mapping the table svn
 * @author Viorel Tacliciu
 * @version 1
 */

@Table(name="svn")
@Entity
public class  Svn{

    //define attributes that maps all columns of the coresponding table
    //this attribute maps the primary key column ID
    private java.lang.Integer id;
    //this attribute maps an bidirectional association
    //it means that FK_SVN from table user_svn_project is a foreign key to ID
    private java.util.List<UserSvnProject> fkSvnUserSvnProject;
    //this attribute maps the column NAME
    private  java.lang.String  name;
    //this attribute maps the column URL
    private  java.lang.String  url;

    private String userName;

    private String password;



    //end mapping columns

    //define getters and setters with coresponding ejb3 annotation, depending of the type
    //of the relation for the column

    /**
     * Mapping the primary key
     * @return - java.lang.Integer the primary key for this entity
     **/
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "ID")
    public  java.lang.Integer  getId(){
        return this.id;
    }

    /**
     * The setter for ID column
     * @param id -  an java.lang.Integer object
     **/
    public void setId( java.lang.Integer  id){
        this.id=id;
    }
    /**
     * This method maps an OneToMany relation between this table and
     * UserSvnProject table
     * @return - an list of UserSvnProject objects
     **/
    @OneToMany(cascade=CascadeType.REFRESH)
    @JoinColumn(name = "FK_SVN",referencedColumnName = "ID") 
    public java.util.List<UserSvnProject> getFkSvnUserSvnProject(){
        return this.fkSvnUserSvnProject;
    }
    
    /**
     * This method sets the field fkSvnUserSvnProject of this entity
     * @param fkSvnUserSvnProject - an list of UserSvnProject objects
     **/
    public void setFkSvnUserSvnProject(java.util.List<UserSvnProject> fkSvnUserSvnProject){
        this.fkSvnUserSvnProject=fkSvnUserSvnProject;
    }
    /**
     * This method gets the name attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "NAME")
    public  java.lang.String  getName(){
        return this.name;
    }

    /**
     * The setter for NAME column
     * @param name -  an  java.lang.String  object
     **/
    public void setName( java.lang.String  name){
        this.name=name;
    }
    /**
     * This method gets the url attribute
     * @return - an  java.lang.String  object
     **/
    @Column(name = "URL")
    public  java.lang.String  getUrl(){
        return this.url;
    }

    /**
     * The setter for URL column
     * @param url -  an  java.lang.String  object
     **/
    public void setUrl( java.lang.String  url){
        this.url=url;
    }

    @Transient
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Transient
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}



